package com.yatop.lambda.base.model;

import com.yuyaogc.lowcode.engine.context.Context;
import com.yuyaogc.lowcode.engine.loader.Loader;
import com.yuyaogc.lowcode.engine.loader.spi.Iloader;

import java.io.IOException;
import java.util.Arrays;


public class MyLoader extends Loader implements Iloader {
    @Override
    public void onStart(Context context) {
        System.err.println("==========onStart============");
        try {
            this.load_modules(Arrays.asList(
                    "base-1.0-SNAPSHOT.jar",
                    "ai-1.0-SNAPSHOT.jar",
                    "im-1.0-SNAPSHOT.jar",
                    "net-1.0-SNAPSHOT.jar"));
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }

    @Override
    public void onDestroy(Context context) {
        System.err.println("==========onDestroy============");

    }

    @Override
    public void setUp() {

    }

    @Override
    public void shutdown() {

    }
}
